<style>
	.imgShow img{
		width: 200px;
	}
</style>
<div id="myTabContent" class="tab-content">
	<table class="table table-bordered" id="list-table">
		<thead>
		<tr>
			<th>ID</th>
			<th style="width: 20%;">图片</th>
			<th style="width: 20%;">标题</th>
			<th style="width: 40%;">说明</th>
			<th>操作</th>
		</tr>
		</thead>
		<tbody>
		{foreach name="list" item="l" key="k"}
			<tr data-id="{$l['id']}">
				<td>{$k+1}</td>
				<td class="imgShow">
					<img src="{$l['image']}" alt="">
				</td>
				<td>{$l['title']}</td>
				<td>{$l['info']}</td>
				<td class="operation">
					<a class="btn btn-xs btn-primary del_btn" href="{:url('editBrandCog',['id'=>$l['id']])}">
						<i class="glyphicon ">编辑</i>
					</a>
				</td>
			</tr>
		{/foreach}
		</tbody>
	</table>
	<div class="text-center">
		{$page}
	</div>
</div><!--myTabContent-->

<script>
    $(".pp").addClass("active open");
    $(".pp .tp").addClass("active");
</script>
<script>
    //删除渠道
    $('.del_btn').on('click', function(e){
        let id = this.parentNode.parentNode.getAttribute('data-id');
        bootbox.confirm("是否删除该数据",function(result){
            if(result){
                $.post("{:url('delHistory')}",{'id':id},function(data){
                    bootbox.alert(data['message'], function(){
                        window.location.reload();
                    });
                });
            }
        });
    });
</script>
